class Solution {
public:
    vector<int> findPeaks(vector<int>& mountain) {
        vector<int> ans;
        for(int i=1,n=mountain.size();i<n-1;++i){
            if(mountain[i - 1] < mountain[i] and mountain[i] > mountain[i + 1]){
                ans.push_back(i);
            }
        }
        return ans;
    }
};